:root {
    --primary: #1a3a5f;
    --secondary: #4a8fe7;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.tabs {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    background: #f1f5f9;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--gray);
}

.tab.active {
    background: var(--secondary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    padding: 25px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    font-size: 1.4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.chart-container {
    height: 300px;
    position: relative;
    margin-bottom: 20px;
}

.btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin: 5px;
    font-weight: 600;
}

.btn:hover {
    background-color: var(--primary);
}

.btn-danger {
    background-color: var(--danger);
}

.btn-success {
    background-color: var(--success);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: #f8f9fa;
}

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0%;
    transition: width 0.5s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.confusion-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 300px;
    margin: 20px auto;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matrix-cell {
    padding: 15px;
    text-align: center;
    font-weight: bold;
}

.header-cell {
    background-color: var(--primary);
    color: white;
}

.fraud-cell {
    background-color: rgba(244, 67, 54, 0.1);
}

.normal-cell {
    background-color: rgba(76, 175, 80, 0.1);
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success);
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid #eaeaea;
}

.model-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
}

.model-stat {
    text-align: center;
    padding: 15px;
    min-width: 150px;
}

.model-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.model-stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    background: #f9fbfd;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--secondary);
    background: #edf4ff;
}

.upload-area.active {
    border-color: var(--success);
    background: #e8f5e9;
}

.upload-icon {
    font-size: 48px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.data-preview {
    max-height: 300px;
    overflow: auto;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
}

.file-name {
    font-weight: 600;
    margin-top: 10px;
    color: var(--primary);
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
}